﻿using System;
using System.Collections.Generic;
using Character;
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.UI;

// Token: 0x020001FC RID: 508
public class WearCustomEdit : MonoBehaviour
{
	// Token: 0x06000DDC RID: 3548 RVA: 0x00055CFC File Offset: 0x00053EFC
	public void Setup(Human human, EditEquipShow equipShow)
	{
		this.human = human;
		this.equipShow = equipShow;
		this.wearTtypeToggles[0].gameObject.SetActive(human.sex == SEX.FEMALE);
		this.wearTtypeToggles[1].gameObject.SetActive(human.sex == SEX.FEMALE);
		for (WEAR_TYPE wear_TYPE = WEAR_TYPE.TOP; wear_TYPE < WEAR_TYPE.NUM; wear_TYPE++)
		{
			this.Setup_WearType(wear_TYPE);
		}
		for (int i = 0; i < this.tabMains.Length; i++)
		{
			this.tabMains[i].gameObject.SetActive(false);
		}
		this.CheckWearTabs();
	}

	// Token: 0x06000DDD RID: 3549 RVA: 0x00055D9C File Offset: 0x00053F9C
	private void OnEnable()
	{
		EditEquipShow.WEARSHOW auto = EditEquipShow.WEARSHOW.ALL;
		if (this.nowTab == 2 || this.nowTab == 3)
		{
			auto = EditEquipShow.WEARSHOW.UNDERWEAR;
		}
		if (this.equipShow != null)
		{
			this.equipShow.SetAuto(auto);
		}
		if (this.human.sex == SEX.FEMALE)
		{
			this.wearTtypeToggles[0].ChangeValue(!this.human.customParam.wear.isSwimwear, false);
			this.wearTtypeToggles[1].ChangeValue(this.human.customParam.wear.isSwimwear, false);
		}
		this.UpdateSlotDataName();
	}

	// Token: 0x06000DDE RID: 3550 RVA: 0x00055E44 File Offset: 0x00054044
	private void Setup_WearType(WEAR_TYPE wearType)
	{
		int wearType2 = (int)wearType;
		string[] array = new string[]
		{
			"トップス",
			"ボトムス",
			"ブラ",
			"ショーツ",
			"水着",
			"水着トップス",
			"水着ボトムス",
			"手袋",
			"パンスト",
			"靴下",
			"靴"
		};
		if (this.human.sex == SEX.MALE && wearType != WEAR_TYPE.TOP && wearType != WEAR_TYPE.SHOES)
		{
			return;
		}
		GameObject gameObject = this.tabMains[wearType2].gameObject;
		List<CustomSelectSet> setDatas = null;
		if (this.human.sex == SEX.FEMALE)
		{
			List<CustomSelectSet>[] array2 = new List<CustomSelectSet>[]
			{
				this.editMode.thumnbs_wear_tops,
				this.editMode.thumnbs_wear_bottoms,
				this.editMode.thumnbs_wear_bra,
				this.editMode.thumnbs_wear_shorts,
				this.editMode.thumnbs_wear_swimwear,
				this.editMode.thumnbs_wear_swimtops,
				this.editMode.thumnbs_wear_swimbottoms,
				this.editMode.thumnbs_wear_glove,
				this.editMode.thumnbs_wear_panst,
				this.editMode.thumnbs_wear_socks,
				this.editMode.thumnbs_wear_shoes
			};
			setDatas = array2[wearType2];
		}
		else if (wearType == WEAR_TYPE.TOP)
		{
			setDatas = this.editMode.thumnbs_wear_tops;
		}
		else if (wearType == WEAR_TYPE.SHOES)
		{
			setDatas = this.editMode.thumnbs_wear_shoes;
		}
		this.itemSelSets[wearType2] = this.editMode.CreateItemSelectUISets(gameObject.gameObject, array[wearType2], setDatas, delegate(CustomSelectSet selData)
		{
			this.ChangeOnWear_SelData(wearType, selData);
		});
		this.editMode.CreateSpace(gameObject);
		this.mainColor[wearType2] = this.editMode.CreateColorChangeButton(gameObject, "メインの色", Color.white, false, delegate(Color val)
		{
			this.OnChangeColor_Main(wearType, val);
		});
		this.mainSpecColor[wearType2] = this.editMode.CreateColorChangeButton(gameObject, "ツヤの色", Color.white, false, delegate(Color val)
		{
			this.OnChangeColor_MainSpec(wearType, val);
		});
		this.mainSpecular[wearType2] = this.editMode.CreateInputSliderUI(gameObject, "ツヤの強さ", 0f, 100f, false, 0f, delegate(float val)
		{
			this.OnChangeSlider_MainSpecular(wearType, val);
		});
		this.mainSmooth[wearType2] = this.editMode.CreateInputSliderUI(gameObject, "ツヤの質感", 0f, 100f, false, 0f, delegate(float val)
		{
			this.OnChangeSlider_MainSmooth(wearType, val);
		});
		this.subColor[wearType2] = this.editMode.CreateColorChangeButton(gameObject, "サブの色", Color.white, false, delegate(Color val)
		{
			this.OnChangeColor_Sub(wearType, val);
		});
		this.subSpecColor[wearType2] = this.editMode.CreateColorChangeButton(gameObject, "ツヤの色", Color.white, false, delegate(Color val)
		{
			this.OnChangeColor_SubSpec(wearType, val);
		});
		this.subSpecular[wearType2] = this.editMode.CreateInputSliderUI(gameObject, "ツヤの強さ", 0f, 100f, false, 0f, delegate(float val)
		{
			this.OnChangeSlider_SubSpecular(wearType, val);
		});
		this.subSmooth[wearType2] = this.editMode.CreateInputSliderUI(gameObject, "ツヤの質感", 0f, 100f, false, 0f, delegate(float val)
		{
			this.OnChangeSlider_SubSmooth(wearType, val);
		});
		if (wearType == WEAR_TYPE.SWIM)
		{
			this.swim_opt_toggle_top = this.editMode.CreateSwitchUI(gameObject, "オプション:上", false, new UnityAction<bool>(this.OnChangeSwimOpt_Top));
			this.swim_opt_toggle_btm = this.editMode.CreateSwitchUI(gameObject, "オプション:下", false, new UnityAction<bool>(this.OnChangeSwimOpt_Bottom));
		}
		this.LoadedCoordinate();
	}

	// Token: 0x06000DDF RID: 3551 RVA: 0x00056214 File Offset: 0x00054414
	private void Update()
	{
		int num = -1;
		for (int i = 0; i < this.toggles.Length; i++)
		{
			if (this.toggles[i].Value)
			{
				num = i;
			}
			this.tabMains[i].gameObject.SetActive(this.toggles[i].gameObject.activeSelf && this.toggles[i].Value);
		}
		if (num != this.nowTab)
		{
			this.ChangeTab(num);
		}
	}

	// Token: 0x06000DE0 RID: 3552 RVA: 0x0005629C File Offset: 0x0005449C
	private void ChangeTab(int tab)
	{
		this.nowTab = tab;
		this.Update_Tab();
		EditEquipShow.WEARSHOW auto = EditEquipShow.WEARSHOW.ALL;
		if (this.nowTab == 2 || this.nowTab == 3)
		{
			auto = EditEquipShow.WEARSHOW.UNDERWEAR;
		}
		if (this.equipShow != null)
		{
			this.equipShow.SetAuto(auto);
		}
		SystemSE.Play(SystemSE.SE.CHOICE);
	}

	// Token: 0x06000DE1 RID: 3553 RVA: 0x000562F8 File Offset: 0x000544F8
	private void Update_Tab()
	{
		if (this.nowTab >= 0)
		{
			WEAR_TYPE wear_TYPE = (WEAR_TYPE)this.nowTab;
			this.LoadedCoordinate(wear_TYPE);
			List<CustomSelectSet> datas = this.itemSelSets[this.nowTab].GetDatas();
			for (int i = 0; i < datas.Count; i++)
			{
				WearData wearData = CustomDataManager.GetWearData(this.human.sex, wear_TYPE, datas[i].id);
				datas[i].hide = (wearData != null && wearData.special == ItemDataBase.SPECIAL.VR_EVENT && !GlobalData.vr_event_item);
			}
			if (this.human.sex == SEX.FEMALE)
			{
				if (wear_TYPE == WEAR_TYPE.TOP)
				{
					int wearID = this.human.customParam.wear.GetWearID(WEAR_TYPE.BOTTOM);
					WearData wearData2 = CustomDataManager.GetWearData(this.human.sex, WEAR_TYPE.BOTTOM, wearID);
					List<CustomSelectSet> datas2 = this.itemSelSets[this.nowTab].GetDatas();
					for (int j = 0; j < datas2.Count; j++)
					{
						bool enable = true;
						if (wearData2 != null && wearData2.coordinates != 0)
						{
							WearData wearData3 = CustomDataManager.GetWearData(this.human.sex, WEAR_TYPE.TOP, datas2[j].id);
							if (wearData3.coordinates == 1)
							{
								enable = false;
							}
						}
						datas2[j].enable = enable;
					}
					int wearID2 = this.human.customParam.wear.GetWearID(WEAR_TYPE.TOP);
					WearData wearData4 = CustomDataManager.GetWearData(this.human.sex, WEAR_TYPE.TOP, wearID2);
					if (wearData4 != null && wearData4.coordinates == 2)
					{
						this.toggles[1].Interactable = false;
					}
					else
					{
						this.toggles[1].Interactable = true;
					}
					this.CheckUnderWearTab();
				}
				else if (wear_TYPE == WEAR_TYPE.BOTTOM)
				{
					int wearID3 = this.human.customParam.wear.GetWearID(WEAR_TYPE.TOP);
					WearData wearData5 = CustomDataManager.GetWearData(this.human.sex, WEAR_TYPE.TOP, wearID3);
					if (wearData5 != null && wearData5.coordinates == 2)
					{
						this.toggles[1].Interactable = false;
					}
					else
					{
						this.toggles[1].Interactable = true;
						List<CustomSelectSet> datas3 = this.itemSelSets[this.nowTab].GetDatas();
						for (int k = 0; k < datas3.Count; k++)
						{
							bool enable2 = true;
							if (wearData5 != null && wearData5.coordinates == 1)
							{
								WearData wearData6 = CustomDataManager.GetWearData(this.human.sex, WEAR_TYPE.BOTTOM, datas3[k].id);
								if (wearData6.coordinates != 0)
								{
									enable2 = false;
								}
							}
							datas3[k].enable = enable2;
						}
					}
					this.CheckUnderWearTab();
				}
				else if (wear_TYPE == WEAR_TYPE.SWIM)
				{
					this.CheckSwimTab();
				}
			}
		}
		this.UpdateSlotDataName();
	}

	// Token: 0x06000DE2 RID: 3554 RVA: 0x000565D8 File Offset: 0x000547D8
	private void UpdateSlotDataName()
	{
		for (int i = 0; i < this.dataNameTexts.Length; i++)
		{
			this.dataNameTexts[i].gameObject.SetActive(this.nowTab == -1);
			WearData wearData = this.human.wears.GetWearData((WEAR_TYPE)i);
			string text = (wearData == null) ? string.Empty : wearData.name;
			if (text == "なし")
			{
				text = string.Empty;
			}
			this.dataNameTexts[i].text = text;
		}
	}

	// Token: 0x06000DE3 RID: 3555 RVA: 0x00056668 File Offset: 0x00054868
	public void ChangeWearType_Normal(bool flag)
	{
		if (flag && this.human.customParam.wear.isSwimwear)
		{
			SystemSE.Play(SystemSE.SE.CHOICE);
			for (int i = 0; i < this.toggles.Length; i++)
			{
				this.toggles[i].Value = false;
			}
			this.human.customParam.wear.isSwimwear = false;
			this.human.Apply();
			this.CheckWearTabs();
			HWearAcceChangeUI hwearAcceChangeUI = UnityEngine.Object.FindObjectOfType<HWearAcceChangeUI>();
			if (hwearAcceChangeUI != null)
			{
				hwearAcceChangeUI.CheckShowUI();
			}
		}
	}

	// Token: 0x06000DE4 RID: 3556 RVA: 0x00056704 File Offset: 0x00054904
	public void ChangeWearType_Swim(bool flag)
	{
		if (flag && !this.human.customParam.wear.isSwimwear)
		{
			SystemSE.Play(SystemSE.SE.CHOICE);
			for (int i = 0; i < this.toggles.Length; i++)
			{
				this.toggles[i].Value = false;
			}
			this.human.customParam.wear.isSwimwear = true;
			this.human.Apply();
			this.CheckWearTabs();
			HWearAcceChangeUI hwearAcceChangeUI = UnityEngine.Object.FindObjectOfType<HWearAcceChangeUI>();
			if (hwearAcceChangeUI != null)
			{
				hwearAcceChangeUI.CheckShowUI();
			}
		}
	}

	// Token: 0x06000DE5 RID: 3557 RVA: 0x000567A0 File Offset: 0x000549A0
	private void CheckWearTabs()
	{
		if (this.human.sex == SEX.FEMALE)
		{
			bool isSwimwear = this.human.customParam.wear.isSwimwear;
			this.toggles[0].gameObject.SetActive(!isSwimwear);
			this.toggles[1].gameObject.SetActive(!isSwimwear);
			this.toggles[2].gameObject.SetActive(!isSwimwear);
			this.toggles[3].gameObject.SetActive(!isSwimwear);
			this.toggles[4].gameObject.SetActive(isSwimwear);
			this.toggles[5].gameObject.SetActive(isSwimwear);
			this.toggles[6].gameObject.SetActive(isSwimwear);
			this.toggles[7].gameObject.SetActive(true);
			this.toggles[8].gameObject.SetActive(true);
			this.toggles[9].gameObject.SetActive(true);
			this.toggles[10].gameObject.SetActive(true);
			this.CheckBottomsTab();
			this.CheckUnderWearTab();
			this.CheckSwimTab();
		}
		else
		{
			this.toggles[0].gameObject.SetActive(true);
			this.toggles[1].gameObject.SetActive(false);
			this.toggles[2].gameObject.SetActive(false);
			this.toggles[3].gameObject.SetActive(false);
			this.toggles[4].gameObject.SetActive(false);
			this.toggles[5].gameObject.SetActive(false);
			this.toggles[6].gameObject.SetActive(false);
			this.toggles[7].gameObject.SetActive(false);
			this.toggles[8].gameObject.SetActive(false);
			this.toggles[9].gameObject.SetActive(false);
			this.toggles[10].gameObject.SetActive(true);
		}
		for (int i = 0; i < this.toggles.Length; i++)
		{
			if (this.tabMains[i].gameObject.activeSelf)
			{
				this.tabMains[i].gameObject.SetActive(this.toggles[i].gameObject.activeSelf && this.toggles[i].Value);
			}
		}
	}

	// Token: 0x06000DE6 RID: 3558 RVA: 0x00056A08 File Offset: 0x00054C08
	private void CheckBottomsTab()
	{
		if (this.human.sex == SEX.FEMALE)
		{
			bool interactable = true;
			WearData wearData_Female = CustomDataManager.GetWearData_Female(WEAR_TYPE.TOP, this.human.customParam.wear.GetWearID(WEAR_TYPE.TOP));
			if (wearData_Female != null && wearData_Female.coordinates == 2)
			{
				interactable = false;
			}
			this.toggles[1].Interactable = interactable;
		}
	}

	// Token: 0x06000DE7 RID: 3559 RVA: 0x00056A68 File Offset: 0x00054C68
	public void CheckUnderWearTab()
	{
		if (this.human.sex == SEX.FEMALE)
		{
			bool interactable = true;
			bool interactable2 = true;
			WearData wearData_Female = CustomDataManager.GetWearData_Female(WEAR_TYPE.TOP, this.human.customParam.wear.GetWearID(WEAR_TYPE.TOP));
			WearData wearData_Female2 = CustomDataManager.GetWearData_Female(WEAR_TYPE.BOTTOM, this.human.customParam.wear.GetWearID(WEAR_TYPE.BOTTOM));
			if (wearData_Female != null)
			{
				if (wearData_Female.braDisable)
				{
					interactable = false;
				}
				if (wearData_Female.shortsDisable)
				{
					interactable2 = false;
				}
			}
			if (wearData_Female2 != null)
			{
				if (wearData_Female2.braDisable)
				{
					interactable = false;
				}
				if (wearData_Female2.shortsDisable)
				{
					interactable2 = false;
				}
			}
			this.toggles[2].Interactable = interactable;
			this.toggles[3].Interactable = interactable2;
		}
	}

	// Token: 0x06000DE8 RID: 3560 RVA: 0x00056B20 File Offset: 0x00054D20
	private void CheckSwimTab()
	{
		if (this.human.sex == SEX.FEMALE)
		{
			bool flag = false;
			bool flag2 = false;
			if (this.human.customParam.wear.isSwimwear)
			{
				WearObj wearObj = this.human.wears.GetWearObj(WEAR_TYPE.SWIM);
				if (wearObj != null)
				{
					Transform x = Transform_Utility.FindTransform(wearObj.obj.transform, Wears.name_swimOptTop);
					Transform x2 = Transform_Utility.FindTransform(wearObj.obj.transform, Wears.name_swimOptBot);
					flag = (x != null);
					flag2 = (x2 != null);
				}
			}
			if (this.swim_opt_toggle_top != null && this.swim_opt_toggle_top != null)
			{
				this.swim_opt_toggle_top.gameObject.SetActive(flag);
				this.swim_opt_toggle_btm.gameObject.SetActive(flag2);
				if (flag)
				{
					this.swim_opt_toggle_top.SetValue(this.human.customParam.wear.swimOptTop);
				}
				if (flag2)
				{
					this.swim_opt_toggle_btm.SetValue(this.human.customParam.wear.swimOptBtm);
				}
			}
		}
	}

	// Token: 0x06000DE9 RID: 3561 RVA: 0x00056C44 File Offset: 0x00054E44
	public void LoadedHuman()
	{
		this.LoadedCoordinate();
	}

	// Token: 0x06000DEA RID: 3562 RVA: 0x00056C4C File Offset: 0x00054E4C
	public void LoadedCoordinate()
	{
		for (int i = 0; i < 11; i++)
		{
			this.LoadedCoordinate((WEAR_TYPE)i);
		}
		this.CheckWearTabs();
	}

	// Token: 0x06000DEB RID: 3563 RVA: 0x00056C7C File Offset: 0x00054E7C
	public void LoadedCoordinate(WEAR_TYPE type)
	{
		WearCustom wearCustom = this.human.customParam.wear.wears[(int)type];
		if (wearCustom == null || this.itemSelSets[(int)type] == null)
		{
			return;
		}
		this.itemSelSets[(int)type].SetSelectedFromDataID(wearCustom.id);
		bool flag = this.human.wears.EnableColorCustom(type);
		bool flag2 = this.human.wears.EnableSecondColorCustom(type);
		bool flag3 = this.human.wears.EnableSecondSpecularCustom(type);
		if (flag)
		{
			this.mainColor[(int)type].SetColor(wearCustom.color.mainColor1);
			this.mainSpecColor[(int)type].SetColor(wearCustom.color.specColor1);
			this.mainSpecular[(int)type].SetValue(wearCustom.color.specular1 * 100f);
			this.mainSmooth[(int)type].SetValue(wearCustom.color.smooth1 * 100f);
		}
		if (flag2)
		{
			this.subColor[(int)type].SetColor(wearCustom.color.mainColor2);
			this.subSpecColor[(int)type].SetColor(wearCustom.color.specColor2);
			this.subSpecular[(int)type].SetValue(wearCustom.color.specular2 * 100f);
			this.subSmooth[(int)type].SetValue(wearCustom.color.smooth2 * 100f);
		}
		this.mainColor[(int)type].gameObject.SetActive(flag);
		this.mainSpecColor[(int)type].gameObject.SetActive(flag);
		this.mainSpecular[(int)type].gameObject.SetActive(flag);
		this.mainSmooth[(int)type].gameObject.SetActive(flag);
		this.subColor[(int)type].gameObject.SetActive(flag2);
		this.subSpecColor[(int)type].gameObject.SetActive(flag2);
		this.subSpecular[(int)type].gameObject.SetActive(flag2 && flag3);
		this.subSmooth[(int)type].gameObject.SetActive(flag2);
	}

	// Token: 0x06000DEC RID: 3564 RVA: 0x00056E88 File Offset: 0x00055088
	private void ChangeOnWear(WEAR_TYPE wear, int id)
	{
		this.human.customParam.wear.wears[(int)wear].id = id;
		this.human.customParam.wear.wears[(int)wear].color = null;
		MaterialCustomData.GetWear(wear, this.human.customParam.wear.wears[(int)wear]);
		this.human.ApplyCoordinate();
		this.Update_Tab();
		HWearAcceChangeUI hwearAcceChangeUI = UnityEngine.Object.FindObjectOfType<HWearAcceChangeUI>();
		if (hwearAcceChangeUI != null)
		{
			hwearAcceChangeUI.CheckShowUI();
		}
	}

	// Token: 0x06000DED RID: 3565 RVA: 0x00056F18 File Offset: 0x00055118
	private void ChangeOnWear_SelData(WEAR_TYPE wearType, CustomSelectSet selData)
	{
		if (selData == null)
		{
			return;
		}
		this.ChangeOnWear(wearType, selData.id);
	}

	// Token: 0x06000DEE RID: 3566 RVA: 0x00056F30 File Offset: 0x00055130
	private void OnChangeColor_Main(WEAR_TYPE type, Color color)
	{
		if (this.human.customParam.wear.wears[(int)type] == null || this.human.customParam.wear.wears[(int)type].color == null)
		{
			return;
		}
		this.human.customParam.wear.wears[(int)type].color.mainColor1 = color;
		this.human.wears.UpdateColorCustom(type);
		MaterialCustomData.SetWear(type, this.human.customParam.wear.wears[(int)type]);
	}

	// Token: 0x06000DEF RID: 3567 RVA: 0x00056FCC File Offset: 0x000551CC
	private void OnChangeColor_MainSpec(WEAR_TYPE type, Color color)
	{
		if (this.human.customParam.wear.wears[(int)type] == null || this.human.customParam.wear.wears[(int)type].color == null)
		{
			return;
		}
		this.human.customParam.wear.wears[(int)type].color.specColor1 = color;
		this.human.wears.UpdateColorCustom(type);
		MaterialCustomData.SetWear(type, this.human.customParam.wear.wears[(int)type]);
	}

	// Token: 0x06000DF0 RID: 3568 RVA: 0x00057068 File Offset: 0x00055268
	private void OnChangeSlider_MainSpecular(WEAR_TYPE type, float val)
	{
		if (this.human.customParam.wear.wears[(int)type] == null || this.human.customParam.wear.wears[(int)type].color == null)
		{
			return;
		}
		this.human.customParam.wear.wears[(int)type].color.specular1 = val * 0.01f;
		this.human.wears.UpdateColorCustom(type);
		MaterialCustomData.SetWear(type, this.human.customParam.wear.wears[(int)type]);
	}

	// Token: 0x06000DF1 RID: 3569 RVA: 0x0005710C File Offset: 0x0005530C
	private void OnChangeSlider_MainSmooth(WEAR_TYPE type, float val)
	{
		if (this.human.customParam.wear.wears[(int)type] == null || this.human.customParam.wear.wears[(int)type].color == null)
		{
			return;
		}
		this.human.customParam.wear.wears[(int)type].color.smooth1 = val * 0.01f;
		this.human.wears.UpdateColorCustom(type);
		MaterialCustomData.SetWear(type, this.human.customParam.wear.wears[(int)type]);
	}

	// Token: 0x06000DF2 RID: 3570 RVA: 0x000571B0 File Offset: 0x000553B0
	private void OnChangeColor_Sub(WEAR_TYPE type, Color color)
	{
		if (this.human.customParam.wear.wears[(int)type] == null || this.human.customParam.wear.wears[(int)type].color == null)
		{
			return;
		}
		this.human.customParam.wear.wears[(int)type].color.mainColor2 = color;
		this.human.wears.UpdateColorCustom(type);
		MaterialCustomData.SetWear(type, this.human.customParam.wear.wears[(int)type]);
	}

	// Token: 0x06000DF3 RID: 3571 RVA: 0x0005724C File Offset: 0x0005544C
	private void OnChangeColor_SubSpec(WEAR_TYPE type, Color color)
	{
		if (this.human.customParam.wear.wears[(int)type] == null || this.human.customParam.wear.wears[(int)type].color == null)
		{
			return;
		}
		this.human.customParam.wear.wears[(int)type].color.specColor2 = color;
		this.human.wears.UpdateColorCustom(type);
		MaterialCustomData.SetWear(type, this.human.customParam.wear.wears[(int)type]);
	}

	// Token: 0x06000DF4 RID: 3572 RVA: 0x000572E8 File Offset: 0x000554E8
	private void OnChangeSlider_SubSpecular(WEAR_TYPE type, float val)
	{
		if (this.human.customParam.wear.wears[(int)type] == null || this.human.customParam.wear.wears[(int)type].color == null)
		{
			return;
		}
		this.human.customParam.wear.wears[(int)type].color.specular2 = val * 0.01f;
		this.human.wears.UpdateColorCustom(type);
		MaterialCustomData.SetWear(type, this.human.customParam.wear.wears[(int)type]);
	}

	// Token: 0x06000DF5 RID: 3573 RVA: 0x0005738C File Offset: 0x0005558C
	private void OnChangeSlider_SubSmooth(WEAR_TYPE type, float val)
	{
		if (this.human.customParam.wear.wears[(int)type] == null || this.human.customParam.wear.wears[(int)type].color == null)
		{
			return;
		}
		this.human.customParam.wear.wears[(int)type].color.smooth2 = val * 0.01f;
		this.human.wears.UpdateColorCustom(type);
		MaterialCustomData.SetWear(type, this.human.customParam.wear.wears[(int)type]);
	}

	// Token: 0x06000DF6 RID: 3574 RVA: 0x00057430 File Offset: 0x00055630
	private void OnChangeSwimOpt_Top(bool flag)
	{
		int num = 4;
		if (this.human.customParam.wear.wears[num] == null)
		{
			return;
		}
		this.human.customParam.wear.swimOptTop = flag;
		this.human.wears.ChangeSwimOption_Top(true);
		SystemSE.Play(SystemSE.SE.CHOICE);
	}

	// Token: 0x06000DF7 RID: 3575 RVA: 0x0005748C File Offset: 0x0005568C
	private void OnChangeSwimOpt_Bottom(bool flag)
	{
		int num = 4;
		if (this.human.customParam.wear.wears[num] == null)
		{
			return;
		}
		this.human.customParam.wear.swimOptBtm = flag;
		this.human.wears.ChangeSwimOption_Bottom(true);
		SystemSE.Play(SystemSE.SE.CHOICE);
	}

	// Token: 0x04000E55 RID: 3669
	[SerializeField]
	private ToggleButton[] wearTtypeToggles = new ToggleButton[2];

	// Token: 0x04000E56 RID: 3670
	private ItemSelectUISets[] itemSelSets = new ItemSelectUISets[11];

	// Token: 0x04000E57 RID: 3671
	private ColorChangeButton[] mainColor = new ColorChangeButton[11];

	// Token: 0x04000E58 RID: 3672
	private ColorChangeButton[] mainSpecColor = new ColorChangeButton[11];

	// Token: 0x04000E59 RID: 3673
	private InputSliderUI[] mainSpecular = new InputSliderUI[11];

	// Token: 0x04000E5A RID: 3674
	private InputSliderUI[] mainSmooth = new InputSliderUI[11];

	// Token: 0x04000E5B RID: 3675
	private ColorChangeButton[] subColor = new ColorChangeButton[11];

	// Token: 0x04000E5C RID: 3676
	private ColorChangeButton[] subSpecColor = new ColorChangeButton[11];

	// Token: 0x04000E5D RID: 3677
	private InputSliderUI[] subSpecular = new InputSliderUI[11];

	// Token: 0x04000E5E RID: 3678
	private InputSliderUI[] subSmooth = new InputSliderUI[11];

	// Token: 0x04000E5F RID: 3679
	[SerializeField]
	private ToggleButton[] toggles = new ToggleButton[11];

	// Token: 0x04000E60 RID: 3680
	[SerializeField]
	private RectTransform[] tabMains = new RectTransform[11];

	// Token: 0x04000E61 RID: 3681
	[SerializeField]
	private Text[] dataNameTexts = new Text[11];

	// Token: 0x04000E62 RID: 3682
	private SwitchUI swim_opt_toggle_top;

	// Token: 0x04000E63 RID: 3683
	private SwitchUI swim_opt_toggle_btm;

	// Token: 0x04000E64 RID: 3684
	private Human human;

	// Token: 0x04000E65 RID: 3685
	private int nowTab = -1;

	// Token: 0x04000E66 RID: 3686
	[SerializeField]
	private EditMode editMode;

	// Token: 0x04000E67 RID: 3687
	private EditEquipShow equipShow;
}
